import { NgModule } from '@angular/core'
import { SharedModule } from '@shared'
import { RiskRoutingModule } from './risk-routing.module'
import { RiskListComponent } from './list/list.component'
import { RiskNewComponent } from './new/new.component'
import { RiskDetailComponent } from './detail/detail.component'
import { RiskService } from './risk.service'
import { RiskAlinterService } from './risk-alinter.service'
import { RiskNewTabBaseComponent } from './new/tab-base/tab-base.component'
import { RiskNewTabConfigComponent } from './new/tab-config/tab-config.component'
import { RiskStoreService } from './new/risk-store.service'
import { RiskDetailTabRulesComponent } from './detail/tab-rules/tab-rules.component'
import { RiskDetailTabLevelsComponent } from './detail/tab-levels/tab-levels.component'
import { RiskRuleDetailComponent } from './rule/detail/detail.component'
import { RiskRuleNewComponent } from './rule/new/new.component'
import { RiskRuleNewBaseComponent } from './rule/new/base/base.component'
import { RiskRuleStoreService } from './rule/new/rule-store.service'
import { RiskRuleFormService } from './rule/new/base/risk-rule-form.service'

const COMPONENTS = [
  RiskListComponent,
  RiskNewComponent,
  RiskDetailComponent,
]
const COMPONENTS_NOROUNT = [
  RiskNewTabBaseComponent,
  RiskNewTabConfigComponent,
  RiskDetailTabRulesComponent,
  RiskDetailTabLevelsComponent,
  RiskRuleDetailComponent,
  RiskRuleNewComponent,
  RiskRuleNewBaseComponent,
]

@NgModule({
  imports: [
    SharedModule,
    RiskRoutingModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: RiskService, useClass: RiskAlinterService },
    RiskStoreService,
    RiskRuleStoreService,
    RiskRuleFormService,
  ]
})
export class RiskModule { }
